package com.bsdsma.visonManagementSystemapp.enums;

public enum AlertLevel {
    NO_ISSUE("无问题"),
    MILD_ISSUE("轻度视力问题"),
    MODERATE_ISSUE("中度视力问题"),
    SEVERE_ISSUE("严重视力问题");

    private final String value;

    AlertLevel(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public static AlertLevel fromString(String text) {
        for (AlertLevel level : AlertLevel.values()) {
            if (level.value.equals(text)) {
                return level;
            }
        }
        throw new IllegalArgumentException("Invalid alert level: " + text);
    }
} 